<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>南方后街</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.validate.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.form.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/DD_belatedPNG.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo a,#header_holder,.menu_information,.menu_setup,.menu_loginout,#nav,.nav_book,.nav_book:hover,.nav_digital,.nav_daily,.nav_jobs');
</script>
<![endif]-->
</head>

<body>

<jsp:include page="../header.jsp" />

	<!-- 中部 -->
<div id="content_holder">
    <div id="content">
    	<!-- 内容列表 -->
		<div id="main"></div>
		      
    	<jsp:include page="right_side.jsp" />
    </div>
</div>
	
	<jsp:include page="../footer.jsp" />
	
<script type="text/javascript" src="${pageContext.request.contextPath}/js/list.js"></script>	
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.pagination.js"></script>
<script type="text/javascript">
$(function(){
	initWebRoot("${pageContext.request.contextPath}");
	childUrl = "/commodity/list/all";
	//要把解析出来的html追加到哪个对象上去，即目标对象
	var aim = $("#main");
	//追加html方法(请求json url，目标对象)
	$.requestData("${pageContext.request.contextPath}"+childUrl,aim);
});	


//目标对象
var aim = $("#main");

// 列出全部的商品
$(".listAllCommodity").click(function(){
	childUrl = "/commodity/list/all";
	$.requestData("${pageContext.request.contextPath}/"+childUrl+"?offset=0",aim);
	alert(200);
});

//列出全部的二手书
$(".listAllBooks").click(function(){
	childUrl = "/commodity/list/type";
	$.requestData("${pageContext.request.contextPath}/"+childUrl+"?type=1000&offset=0",aim);
	alert(200);
});

//列出全部的数码产品
$(".listAllDigital").click(function(){
	childUrl = "/commodity/list/type";
	$.requestData("${pageContext.request.contextPath}/"+childUrl+"?type=2000&offset=0",aim);
	alert(200);
});

//列出全部的日常用品
$(".listAllDaily").click(function(){
	childUrl = "/commodity/list/type";
	$.requestData("${pageContext.request.contextPath}/"+childUrl+"?type=3000&offset=0",aim);
	alert(200);
});

//列出全部的招聘类信息
$(".listAllJobs").click(function(){
	childUrl = "/commodity/list/type";
	$.requestData("${pageContext.request.contextPath}/"+childUrl+"?type=4000&offset=0",aim);
	alert(200);
});

</script>

</body>
</html>
